@echo off

if "%1"=="0" goto prepare
call mvn clean install -U

:prepare
if "%2"=="0" goto add
echo "prepare"
java -jar target/FastenerV2-1.0-jar-with-dependencies.jar p

:add
if "%3"=="0" goto start
echo "add"
java -jar target/FastenerV2-1.0-jar-with-dependencies.jar a %3

:start
if "%4"=="0" goto end
echo "start"
start mvn exec:java -Dexec.args=n
start mvn exec:java -Dexec.args=n
start mvn exec:java -Dexec.args=n
mvn exec:java -Dexec.args=s

:end
echo "build end"